package com.yanyeori.nacosfeign.fallback;

import com.yanyeori.framework.core.model.WebResponse;
import com.yanyeori.nacosfeign.client.FeignBClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author chenkuan
 * @desc
 * @date 2021/3/24 024 10:58
 */
@Component
public class FeignBClientBack implements FeignBClient {
    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public WebResponse rest(String param) {
        logger.warn("FeignBClient.rest熔断降级处理，请求参数param={}", param);
        return WebResponse.fail(1, "FeignBClient.rest熔断降级处理，请求参数param={0}", param);
    }
}
